package org.mat.ipaas.ucenter.service.api.message;

import org.mat.framework.lang.dto.MatApiResponse;
import org.mat.ipaas.ucenter.service.dto.message.entity.SysMessageDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * 消息
 */
@FeignClient(name = "mat-ipaas-ucenter-service",contextId = "sys-message-rest-api")
public interface SysMessageRestAPI {

	/**
	 * 分页列表查询
	 * 
	 * @param sysMessageDTO
	 * @param pageNo
	 * @param pageSize
	 * @return
	 */
	@GetMapping(value = "/sys/message/sysMessage/list")
    MatApiResponse<?> queryPageList(@SpringQueryMap SysMessageDTO sysMessageDTO,
									@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
									@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize);

	/**
	 * 添加
	 * 
	 * @param sysMessageDTO
	 * @return
	 */
	@PostMapping(value = "/sys/message/sysMessage/add")
    MatApiResponse<?> add(@RequestBody SysMessageDTO sysMessageDTO);

	/**
	 * 编辑
	 * 
	 * @param sysMessageDTO
	 * @return
	 */
	@PutMapping(value = "/sys/message/sysMessage/edit")
    MatApiResponse<?> edit(@RequestBody SysMessageDTO sysMessageDTO);

	/**
	 * 通过id删除
	 * 
	 * @param id
	 * @return
	 */
	@DeleteMapping(value = "/sys/message/sysMessage/delete")
    MatApiResponse<?> delete(@RequestParam(name = "id", required = true) String id);

	/**
	 * 批量删除
	 * 
	 * @param ids
	 * @return
	 */
	@DeleteMapping(value = "/sys/message/sysMessage/deleteBatch")
    MatApiResponse<?> deleteBatch(@RequestParam(name = "ids", required = true) String ids);

	/**
	 * 通过id查询
	 * 
	 * @param id
	 * @return
	 */
	@GetMapping(value = "/sys/message/sysMessage/queryById")
    MatApiResponse<?> queryById(@RequestParam(name = "id", required = true) String id);

	/**
	 * 导出excel
	 *
	 * 
	 */
	@GetMapping(value = "/sys/message/sysMessage/exportXls")
    ModelAndView exportXls( SysMessageDTO sysMessageDTO);

	/**
	 * excel导入
	 *
	 * 
	 * 
	 * @return
	 */
	@PostMapping(value = "/sys/message/sysMessage/importExcel")
    MatApiResponse<?> importExcel( );

}
